-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✅ test: add unit test for src/services/user/server.ts #6337
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
👍 @gru-agent[bot] Thank you for raising your pull request and contributing to our Community |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6337 +/- ##
==========================================
+ Coverage 91.79% 91.85% +0.06%
==========================================
Files 684 684
Lines 62344 62344
Branches 3104 4345 +1241
==========================================
+ Hits 57228 57267 +39
+ Misses 5116 5077 -39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
❤️ Great PR @gru-agent[bot] ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
🎉 This PR is included in version 1.62.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…behub#6337) Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
Trigger Info
Summary
This PR introduces unit tests for the
ServerService
class, ensuring the correctness of its methods that interact with thelambdaClient
for user-related operations. The following functionalities are covered:User Registration Duration: Tests the retrieval of user registration duration.
User State: Verifies fetching the user's initialization state.
SSO Providers: Includes tests for fetching and unlinking SSO providers.
User Onboarding: Ensures the user onboarding process is correctly handled.
User Preferences: Validates updating user preferences.
User Guide: Tests the update of user guide settings.
User Settings: Covers updating and resetting user settings, including support for partial updates and abort signals.
Mocking is implemented using
vitest
to simulatelambdaClient
behavior, ensuring isolated and reliable tests.Tip
You can
@gru-agent
and leave your feedback. TestGru will make adjustments based on your inputTip
You can
@gru-agent rebase
to rebase the PR.Tip
You can
@gru-agent redo
to reset or rebase before redoing the PR.Tip
To modify the test code yourself, click here Edit Test Code